package org.evil.deus.rss;

import android.database.Cursor;

public class CursorUtils {
	public static final String getString(Cursor cursor, String columnName) {
		String result = null;
		int columnIndex = cursor.getColumnIndex(columnName);
		if (columnIndex > -1) {
			result = cursor.getString(columnIndex);
		}
		return result;
	}
	
	public static final int getInt(Cursor cursor, String columnName) {
		int result = Integer.MIN_VALUE;
		int columnIndex = cursor.getColumnIndex(columnName);
		if (columnIndex > -1) {
			result = cursor.getInt(columnIndex);
		}
		return result;
	}
}
